from pydantic import BaseModel,Field
from typing import List,Literal,Union
from datetime import date
#学生信息请求体（响应体）
class Stu_schema(BaseModel):
    student_id: int
    class_name: str
    student_name: str=Field(...,max_length=20)
    hometown: str=Field(...,max_length=20)
    previous_school: str=Field(...,max_length=20)
    major: str=Field(...,max_length=20)
    enrollment_date:date
    graduation_date: date
    education_level: str
    advisor_id: str
    age: int =Field(ge=0,le=100)
    gender: Literal["男","女"] = "男"









